{template 'web/common/header'}

<body>
    <style>
        .table-box {
            padding-bottom: 10px;
            width: 100%;
        }

        .detail-bottom {
            margin-top: 20px;
        }

        .detail-header span,
        .detail-bottom span {
            margin-right: 30px;
        }

        .detail-header span label,
        .detail-bottom span label {
            font-weight: 100;
        }
    </style>
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-body">
                <div class="table-box detail-header">
                    <div class="table-cell">
                        <span><label>仓库：</label>{$detail['storage_name']}</span>
                        <span><label>单号：</label>{$detail['record']}</span>
                        <span><label>出库日期：</label>{$detail['record_date']}</span>
                        <span><label>制单人：</label>{$detail['originator']}</span>
                    </div>
                    <div class="table-cell tr"></div>
                </div>
                <div id="inTable" lay-filter="inTable"></div>
                <div class="table-box detail-bottom">
                    <div class="table-cell">
                        <span><label>经办人：</label>{$detail['transactor']}</span>
                        <span><label>备注：</label>{$detail['remark']}</span>
                    </div>
                    <div class="table-cell tr"></div>
                </div>
            </div>
        </div>
    </div>

    <script src="../addons/xn_erp/images/layuiadmin/layui/layui.js"></script>
    <script>
        layui.config({
            base: '../addons/xn_erp/images/layuiadmin/layui/extend/'
        }).use(['table', 'form', 'jquery', 'tableSelect', 'laypage', 'laydate'], function () {
            var table = layui.table, form = layui.table, $ = layui.$, form = layui.form, tableSelect = layui.tableSelect, laypage = layui.laypage, laydate = layui.laydate;
            laydate.render({
                elem: '#record_date' //指定元素
            });
        
          
            var inTable = table.render({
                elem: '#inTable',
                height: 480,
                data: JSON.parse('{$data}'),
                loading:true,
                page: true,
                text: { none: '请添加要出库的商品' },
                cols: [[
                    { field: 'number', title: '商品编码', width: 100, fixed: true },
                    { field: 'name', title: '商品名称', minWidth: 200 },
                    { field: 'snumber', title: '出库数量', width: 100, },
                    { field: 'unit_name', title: '单位', width: 60 },
                    { field: 'remark', title: '备注', },
                ]],

            });
        });

    </script>
</body>


</html>